﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RemoveControl : Photon.MonoBehaviour 
{
	public GameObject[] privateObjects;
	public MonoBehaviour[] privateScripts;

	private PhotonView thisPhotonView;

	void Awake()
	{
		thisPhotonView = GetComponent<PhotonView> ();
		Initialize ();
	}

	void Initialize()
	{
		if(!thisPhotonView.isMine)
		{	
			foreach (GameObject o in privateObjects)
			{
				o.SetActive (false);
			}
			foreach (MonoBehaviour m in privateScripts)
			{
				m.enabled = false;
			}

		}
	}

}
